import Vue from "vue";
import Vuex from "vuex";
import createPersistedstate from "vuex-persistedstate";
import user from "./modules/user";
import tags from "./modules/tags";
import order from "@/store/modules/order";
import getters from "./getter";

Vue.use(Vuex);

const store = new Vuex.Store({
  modules: {
    user,
    tags,
    order,
  },
  getters,
  plugins: [
    createPersistedstate({
      key: "erabbit-client-pc-store",
      paths: ["user", "tags"],
    }),
  ],
});

export default store;
